package cn.bigfire.compiler.dragon.appendixA.handwrite.symbols;

import cn.bigfire.compiler.dragon.appendixA.handwrite.lexer.Tag;

public class Array extends Type {

    public Type of;      //数组 元素类型
    public int size = 1; //数组 元素个数


    public Array(int size, Type type) {
        super("[]", Tag.INDEX, size * type.width);
        this.size = size;
        this.of = type;
    }

    @Override
    public String toString() {
        return "[" + size + "]" + of.toString();
    }
}
